
from rest_framework.serializers import ModelSerializer
from backend.apps.gathering.models import Gathering



# 定义序列化器
class GatherSerializer(ModelSerializer):

    class Meta:
        # 指定模型类
        model = Gathering
        # 指定字段
        fields = "__all__"
# 定义图片序列化器




class GatherSerializerSimple(ModelSerializer):
    class Meta:

        model = Gathering

        fields = ["id", "name", "image", "city", "starttime", "endrolltime", "users"]